package edu.ynu.se.xiecheng.achitectureclass.demo.entity;

import edu.ynu.se.xiecheng.achitectureclass.common.entity.LogicEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.Where;

import javax.persistence.*;

@Getter
@Setter
@MappedSuperclass
@Where(clause = "is_deleted = 0")
@ApiModel(description = "数据信息")
public class Data extends LogicEntity {
    @ManyToOne
    @JoinColumn(name = "device_id", referencedColumnName = "id")
    @ApiModelProperty(value = "所属设备", required = true)
    private Device device;
}